/* ** por compatibilidad se omiten tildes **
================================================================================
 TRABAJO PRACTICO 3 - System Programming - ORGANIZACION DE COMPUTADOR II - FCEN
================================================================================
  definicion de funciones del scheduler
*/

#ifndef __SCHED_H__
#define __SCHED_H__

#include "tss.h"
#include "gdt.h"
#include "mmu.h"
#include "i386.h"

extern unsigned short tareas[CANT_TAREAS];

void inicializar_scheduler();
unsigned short proximo_indice();
void eliminar_tarea(unsigned int _cr3);
unsigned int identificarTarea(unsigned int _cr3);
unsigned int estaViva(unsigned int tarea); //devuelve 1 si esta viva, 0 si no
unsigned int posicionCodigo(unsigned int _cr3);
unsigned int posicionStack(unsigned int _cr3);
unsigned int posicionShared(unsigned int _cr3);
unsigned int posCodigo(unsigned int tarea);
unsigned int posStack(unsigned int tarea);
unsigned int posShared(unsigned int tarea);
void inicializar_arena();

void setPage(unsigned int indice, unsigned int _cr3);

#endif
